<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>02-03-v-html</title>
</head>
<body>

  <!-- 在 ide、编辑器 添加语法糖快捷键， vue=`...下面body内的代码...` -->
  <div id="app">
    <h2> {{message}} </h2>
    <h1 v-html='a_url'></h1>
    <div v-html='url_img'></div>
    <div v-html='div_static'></div>

    <br />
    <hr />
    <br />

    <p>1.下面是失败的情况</p>
    <img src={{url}}  alt='网络图片' style="width: 50px; height: 50px;" />
    <br />
    <img src=`{{url_static}}`  alt='网络图片-static' style="width: 50px; height: 50px;" />
    <br /><br />
    <p>2.下面为了验证，img标签是可行的,没有采用vue</p>
    <img src="http://n.sinaimg.cn/photo/transform/700/w1000h500/20200323/1ecb-ireifzi0941036.jpg" 
        alt='网络图片22' 
        style="width: 50px; height: 50px;" />
  </div>

  <script src="../../js/vue.js"></script>
  <script>
    let img_url = 'http://n.sinaimg.cn/photo/transform/700/w1000h500/20200323/1ecb-ireifzi0941036.jpg';
    const app = new Vue({
      el: '#app',
      data: {
        message: '你好',
        a_url: '<a href="'+img_url+' " title="跳转到图片" >百度一下</a>',
        url: img_url,
        url_img: '<img src="'+ img_url +' alt="图片3-惜败" style="width: 50px; height: 50px;" />',
        url_static: 'http://n.sinaimg.cn/photo/transform/700/w1000h500/20200323/1ecb-ireifzi0941036.jpg',
        div_static: '<div style="background-color: red">div文本</div>'
      },
    })
  </script>
</body>
</html>